package cn.sykj.car.service;

import cn.sykj.car.common.ResponseBean;
import cn.sykj.car.entity.Operation;
import cn.sykj.car.entity.Users;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 操作权限 服务类
 * </p>
 *
 * @author Yixu
 * @since 2018-11-29
 */
public interface IOperationService extends IService<Operation> {
    public List<String> getPermissionCodesByRoles(List roles);

    /**
     * 添加
     * @param operation
     * @return
     * @throws Exception
     * @author yuhao
     * @version 2018-12-05 17:26
     */
    public boolean insertOperation(Operation operation) throws Exception;

    /**
     * 修改
     * @param operation
     * @return
     * @throws Exception
     * @author yuhao
     * @version 2018-12-05 17:26
     */
    public boolean updateOperation(Operation operation) throws Exception;

    /**
     * 删除
     * @param operation
     * @return
     * @throws Exception
     * @author yuhao
     * @version 2018-12-05 17:26
     */
    public boolean deleteOperation(Operation operation) throws Exception;

    /**
     * 按id查看单条记录
     * @param operation
     * @return
     * @author yuhao
     * @version 2018-12-05 17:26
     */
    public Operation selectOneOperation(Operation operation);

    /**
     * 按条件分页查询多条数据
     * @param page
     * @param condition
     * @return
     * @author yuhao
     * @version 2018-12-05 17:26
     */
    public Page<Operation> pageOperation(Page<Operation> page,Operation condition);

    /**
     * 根据角色id查询操作权限
     * @param roleId
     * @return
     * @author yuhao 2018-12-07 15:56
     */
    public List<Operation> selectOperationsByRoleId(Integer roleId);


}
